﻿<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>

  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Class Circuit </title>
    <meta name="viewport" content="width=device-width">
    <meta name="title" content="Class Circuit ">
    <meta name="generator" content="docfx ">
  
    <link rel="shortcut icon" href="../api/images/favicon.ico">
    <link rel="stylesheet" href="../styles/docfx.vendor.css">
    <link rel="stylesheet" href="../styles/docfx.css">
    <link rel="stylesheet" href="../styles/main.css">
    <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> 
    <meta property="docfx:navrel" content="../toc.html">
    <meta property="docfx:tocrel" content="toc.html">
    <script type="text/javascript" async="" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=TeX-MML-AM_CHTML"></script>
  
  
  
  </head>  <body data-spy="scroll" data-target="#affix" data-offset="120">
    <div id="wrapper">
      <header>

        <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
          <div class="container">
            <div class="navbar-header">
              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
              </button>

              <a class="navbar-brand" href="../index.html">
                <img id="logo" class="svg" src="../api/images/favicon.svg" alt="">
              </a>
            </div>
            <div class="collapse navbar-collapse" id="navbar">
              <form class="navbar-form navbar-right" role="search" id="search">
                <div class="form-group">
                  <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
                </div>
              </form>
            </div>
          </div>
        </nav>

        <div class="subnav navbar navbar-default">
          <div class="container hide-when-search" id="breadcrumb">
            <ul class="breadcrumb">
              <li></li>
            </ul>
          </div>
        </div>
      </header>
      <div role="main" class="container body-content hide-when-search">

        <div class="sidenav hide-when-search">
          <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
          <div class="sidetoggle collapse" id="sidetoggle">
            <div id="sidetoc"></div>
          </div>
        </div>
        <div class="article row grid-right">
          <div class="col-md-10">
            <article class="content wrap" id="_content" data-uid="SpiceSharp.Circuit">



  <h1 id="SpiceSharp_Circuit" data-uid="SpiceSharp.Circuit" class="text-break">Class Circuit</h1>
  <div class="markdown level0 summary"><p>Represents an electronic circuit.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">Circuit</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="SpiceSharp.Entities.IEntityCollection.html">IEntityCollection</a></div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection</a>&lt;<a class="xref" href="SpiceSharp.Entities.IEntity.html">IEntity</a>&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="SpiceSharp.Entities.IEntity.html">IEntity</a>&gt;</div>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></div>
    <div><a class="xref" href="SpiceSharp.ICloneable-1.html">ICloneable</a>&lt;<a class="xref" href="SpiceSharp.Entities.IEntityCollection.html">IEntityCollection</a>&gt;</div>
  </div>
  <div class="inheritedMembers">
    <h5>Inherited Members</h5>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
    </div>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
    </div>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
    </div>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
    </div>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
    </div>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
    </div>
    <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
    </div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="SpiceSharp.html">SpiceSharp</a></h6>
  <h6><strong>Assembly</strong>: SpiceSharp.dll</h6>
  <h5 id="SpiceSharp_Circuit_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class Circuit : IEntityCollection, ICollection&lt;IEntity&gt;, IEnumerable&lt;IEntity&gt;, IEnumerable, ICloneable&lt;IEntityCollection&gt;</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <a id="SpiceSharp_Circuit__ctor_" data-uid="SpiceSharp.Circuit.#ctor*"></a>
  <h4 id="SpiceSharp_Circuit__ctor" data-uid="SpiceSharp.Circuit.#ctor">Circuit()</h4>
  <div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="SpiceSharp.Circuit.html">Circuit</a> class.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public Circuit()</code></pre>
  </div>
  <a id="SpiceSharp_Circuit__ctor_" data-uid="SpiceSharp.Circuit.#ctor*"></a>
  <h4 id="SpiceSharp_Circuit__ctor_SpiceSharp_Entities_IEntityCollection_" data-uid="SpiceSharp.Circuit.#ctor(SpiceSharp.Entities.IEntityCollection)">Circuit(IEntityCollection)</h4>
  <div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="SpiceSharp.Circuit.html">Circuit</a> class.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public Circuit(IEntityCollection entities)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Entities.IEntityCollection.html">IEntityCollection</a></td>
        <td><span class="parametername">entities</span></td>
        <td><p>The entities.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="exceptions">Exceptions</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Condition</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></td>
        <td><p>Thrown if <code class="paramref">entities</code> is <code>null</code>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Circuit__ctor_" data-uid="SpiceSharp.Circuit.#ctor*"></a>
  <h4 id="SpiceSharp_Circuit__ctor_SpiceSharp_Entities_IEntity___" data-uid="SpiceSharp.Circuit.#ctor(SpiceSharp.Entities.IEntity[])">Circuit(params IEntity[])</h4>
  <div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="SpiceSharp.Circuit.html">Circuit</a> class.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public Circuit(params IEntity[] entities)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Entities.IEntity.html">IEntity</a>[]</td>
        <td><span class="parametername">entities</span></td>
        <td><p>The entities describing the circuit.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Circuit__ctor_" data-uid="SpiceSharp.Circuit.#ctor*"></a>
  <h4 id="SpiceSharp_Circuit__ctor_System_Collections_Generic_IEnumerable_SpiceSharp_Entities_IEntity__" data-uid="SpiceSharp.Circuit.#ctor(System.Collections.Generic.IEnumerable{SpiceSharp.Entities.IEntity})">Circuit(IEnumerable&lt;IEntity&gt;)</h4>
  <div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="SpiceSharp.Circuit.html">Circuit</a> class.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public Circuit(IEnumerable&lt;IEntity&gt; entities)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="SpiceSharp.Entities.IEntity.html">IEntity</a>&gt;</td>
        <td><span class="parametername">entities</span></td>
        <td><p>The entities describing the circuit.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <a id="SpiceSharp_Circuit_Comparer_" data-uid="SpiceSharp.Circuit.Comparer*"></a>
  <h4 id="SpiceSharp_Circuit_Comparer" data-uid="SpiceSharp.Circuit.Comparer">Comparer</h4>
  <div class="markdown level1 summary"><p>Gets the comparer used to compare <a class="xref" href="SpiceSharp.Entities.Entity.html">Entity</a> names.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IEqualityComparer&lt;string&gt; Comparer { get; }</code></pre>
  </div>
  <h5 class="propertyValue">Property Value</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.iequalitycomparer-1">IEqualityComparer</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>&gt;</td>
        <td><p>The comparer.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Circuit_Count_" data-uid="SpiceSharp.Circuit.Count*"></a>
  <h4 id="SpiceSharp_Circuit_Count" data-uid="SpiceSharp.Circuit.Count">Count</h4>
  <div class="markdown level1 summary"><p>Gets the number of elements contained in the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public int Count { get; }</code></pre>
  </div>
  <h5 class="propertyValue">Property Value</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Circuit_IsReadOnly_" data-uid="SpiceSharp.Circuit.IsReadOnly*"></a>
  <h4 id="SpiceSharp_Circuit_IsReadOnly" data-uid="SpiceSharp.Circuit.IsReadOnly">IsReadOnly</h4>
  <div class="markdown level1 summary"><p>Gets a value indicating whether the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a> is read-only.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public bool IsReadOnly { get; }</code></pre>
  </div>
  <h5 class="propertyValue">Property Value</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
        <td></td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Circuit_Item_" data-uid="SpiceSharp.Circuit.Item*"></a>
  <h4 id="SpiceSharp_Circuit_Item_System_String_" data-uid="SpiceSharp.Circuit.Item(System.String)">this[string]</h4>
  <div class="markdown level1 summary"><p>Gets the <a class="xref" href="SpiceSharp.Entities.IEntity.html">IEntity</a> with the specified name.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IEntity this[string name] { get; }</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
        <td><span class="parametername">name</span></td>
        <td><p>The name of the entity.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="propertyValue">Property Value</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Entities.IEntity.html">IEntity</a></td>
        <td><p>The <a class="xref" href="SpiceSharp.Entities.IEntity.html">IEntity</a>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="exceptions">Exceptions</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Condition</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></td>
        <td><p>Thrown if <code class="paramref">name</code> is <code>null</code>.</p>
</td>
      </tr>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.keynotfoundexception">KeyNotFoundException</a></td>
        <td><p>Thrown if no entity with the name <code class="paramref">name</code> could be found.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <a id="SpiceSharp_Circuit_Add_" data-uid="SpiceSharp.Circuit.Add*"></a>
  <h4 id="SpiceSharp_Circuit_Add_SpiceSharp_Entities_IEntity_" data-uid="SpiceSharp.Circuit.Add(SpiceSharp.Entities.IEntity)">Add(IEntity)</h4>
  <div class="markdown level1 summary"><p>Adds an item to the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public void Add(IEntity item)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Entities.IEntity.html">IEntity</a></td>
        <td><span class="parametername">item</span></td>
        <td><p>The object to add to the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Circuit_ByType_" data-uid="SpiceSharp.Circuit.ByType*"></a>
  <h4 id="SpiceSharp_Circuit_ByType__1" data-uid="SpiceSharp.Circuit.ByType``1">ByType&lt;E&gt;()</h4>
  <div class="markdown level1 summary"><p>Gets all entities that are of a specified type.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IEnumerable&lt;E&gt; ByType&lt;E&gt;() where E : IEntity</code></pre>
  </div>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;E&gt;</td>
        <td><p>The entities.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="typeParameters">Type Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><span class="parametername">E</span></td>
        <td><p>The type of entity.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Circuit_Clear_" data-uid="SpiceSharp.Circuit.Clear*"></a>
  <h4 id="SpiceSharp_Circuit_Clear" data-uid="SpiceSharp.Circuit.Clear">Clear()</h4>
  <div class="markdown level1 summary"><p>Removes all items from the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public void Clear()</code></pre>
  </div>
  <a id="SpiceSharp_Circuit_Clone_" data-uid="SpiceSharp.Circuit.Clone*"></a>
  <h4 id="SpiceSharp_Circuit_Clone" data-uid="SpiceSharp.Circuit.Clone">Clone()</h4>
  <div class="markdown level1 summary"><p>Clones the instance.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IEntityCollection Clone()</code></pre>
  </div>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Entities.IEntityCollection.html">IEntityCollection</a></td>
        <td><p>The cloned instance.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Circuit_Contains_" data-uid="SpiceSharp.Circuit.Contains*"></a>
  <h4 id="SpiceSharp_Circuit_Contains_SpiceSharp_Entities_IEntity_" data-uid="SpiceSharp.Circuit.Contains(SpiceSharp.Entities.IEntity)">Contains(IEntity)</h4>
  <div class="markdown level1 summary"><p>Determines whether this instance contains the object.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public bool Contains(IEntity item)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Entities.IEntity.html">IEntity</a></td>
        <td><span class="parametername">item</span></td>
        <td><p>The object to locate in the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
        <td><p>true if <code class="paramref">item</code> is found in the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>; otherwise, false.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Circuit_Contains_" data-uid="SpiceSharp.Circuit.Contains*"></a>
  <h4 id="SpiceSharp_Circuit_Contains_System_String_" data-uid="SpiceSharp.Circuit.Contains(System.String)">Contains(string)</h4>
  <div class="markdown level1 summary"><p>Determines whether this instance contains an <a class="xref" href="SpiceSharp.Entities.IEntity.html">IEntity</a> with the specified name.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public bool Contains(string name)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
        <td><span class="parametername">name</span></td>
        <td><p>The name.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
        <td><p><code>true</code> if the collection contains the entity; otherwise, <code>false</code>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Circuit_CopyTo_" data-uid="SpiceSharp.Circuit.CopyTo*"></a>
  <h4 id="SpiceSharp_Circuit_CopyTo_SpiceSharp_Entities_IEntity___System_Int32_" data-uid="SpiceSharp.Circuit.CopyTo(SpiceSharp.Entities.IEntity[],System.Int32)">CopyTo(IEntity[], int)</h4>
  <div class="markdown level1 summary"><p>Copies the elements of the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a> to an <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.array">Array</a>, starting at a particular <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.array">Array</a> index.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public void CopyTo(IEntity[] array, int arrayIndex)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Entities.IEntity.html">IEntity</a>[]</td>
        <td><span class="parametername">array</span></td>
        <td><p>The one-dimensional <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.array">Array</a> that is the destination of the elements copied from <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>. The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.array">Array</a> must have zero-based indexing.</p>
</td>
      </tr>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
        <td><span class="parametername">arrayIndex</span></td>
        <td><p>The zero-based index in <code class="paramref">array</code> at which copying begins.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Circuit_GetEnumerator_" data-uid="SpiceSharp.Circuit.GetEnumerator*"></a>
  <h4 id="SpiceSharp_Circuit_GetEnumerator" data-uid="SpiceSharp.Circuit.GetEnumerator">GetEnumerator()</h4>
  <div class="markdown level1 summary"><p>Returns an enumerator that iterates through the collection.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public IEnumerator&lt;IEntity&gt; GetEnumerator()</code></pre>
  </div>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerator-1">IEnumerator</a>&lt;<a class="xref" href="SpiceSharp.Entities.IEntity.html">IEntity</a>&gt;</td>
        <td><p>An enumerator that can be used to iterate through the collection.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Circuit_Merge_" data-uid="SpiceSharp.Circuit.Merge*"></a>
  <h4 id="SpiceSharp_Circuit_Merge_SpiceSharp_Circuit_" data-uid="SpiceSharp.Circuit.Merge(SpiceSharp.Circuit)">Merge(Circuit)</h4>
  <div class="markdown level1 summary"><p>Merge a circuit with this one. Entities are merged by reference!</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public void Merge(Circuit ckt)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Circuit.html">Circuit</a></td>
        <td><span class="parametername">ckt</span></td>
        <td><p>The circuit to merge with.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="exceptions">Exceptions</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Condition</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></td>
        <td><p>Thrown if <code class="paramref">ckt</code> is <code>null</code>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Circuit_Remove_" data-uid="SpiceSharp.Circuit.Remove*"></a>
  <h4 id="SpiceSharp_Circuit_Remove_SpiceSharp_Entities_IEntity_" data-uid="SpiceSharp.Circuit.Remove(SpiceSharp.Entities.IEntity)">Remove(IEntity)</h4>
  <div class="markdown level1 summary"><p>Removes the first occurrence of a specific object from the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public bool Remove(IEntity item)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="SpiceSharp.Entities.IEntity.html">IEntity</a></td>
        <td><span class="parametername">item</span></td>
        <td><p>The object to remove from the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
        <td><p>true if <code class="paramref">item</code> was successfully removed from the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>; otherwise, false. This method also returns false if <code class="paramref">item</code> is not found in the original <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Circuit_Remove_" data-uid="SpiceSharp.Circuit.Remove*"></a>
  <h4 id="SpiceSharp_Circuit_Remove_System_String_" data-uid="SpiceSharp.Circuit.Remove(System.String)">Remove(string)</h4>
  <div class="markdown level1 summary"><p>Removes the <a class="xref" href="SpiceSharp.Entities.IEntity.html">IEntity</a> with specified name.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public bool Remove(string name)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
        <td><span class="parametername">name</span></td>
        <td><p>The name of the entity.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
        <td><p><code>true</code> is the entity was removed succesfully; otherwise <code>false</code>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="exceptions">Exceptions</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Condition</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></td>
        <td><p>Thrown if <code class="paramref">name</code> is <code>null</code>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <a id="SpiceSharp_Circuit_TryGetEntity_" data-uid="SpiceSharp.Circuit.TryGetEntity*"></a>
  <h4 id="SpiceSharp_Circuit_TryGetEntity_System_String_SpiceSharp_Entities_IEntity__" data-uid="SpiceSharp.Circuit.TryGetEntity(System.String,SpiceSharp.Entities.IEntity@)">TryGetEntity(string, out IEntity)</h4>
  <div class="markdown level1 summary"><p>Tries to find an <a class="xref" href="SpiceSharp.Entities.Entity.html">Entity</a> in the collection.</p>
</div>
  <div class="markdown level1 conceptual"></div>
  <h5 class="declaration">Declaration</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public bool TryGetEntity(string name, out IEntity entity)</code></pre>
  </div>
  <h5 class="parameters">Parameters</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
        <td><span class="parametername">name</span></td>
        <td><p>The name of the entity.</p>
</td>
      </tr>
      <tr>
        <td><a class="xref" href="SpiceSharp.Entities.IEntity.html">IEntity</a></td>
        <td><span class="parametername">entity</span></td>
        <td><p>The entity.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h5 class="returns">Returns</h5>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Type</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
        <td><p><code>True</code> if the entity is found; otherwise <code>false</code>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="implements">Implements</h3>
  <div>
      <a class="xref" href="SpiceSharp.Entities.IEntityCollection.html">IEntityCollection</a>
  </div>
  <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.icollection-1">ICollection&lt;T&gt;</a>
  </div>
  <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable&lt;T&gt;</a>
  </div>
  <div>
      <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a>
  </div>
  <div>
      <a class="xref" href="SpiceSharp.ICloneable-1.html">ICloneable&lt;T&gt;</a>
  </div>
  <h3 id="extensionmethods">Extension Methods</h3>
  <div>
      <a class="xref" href="SpiceSharp.Utility.html#SpiceSharp_Utility_ThrowIfNull__1___0_System_String_">Utility.ThrowIfNull&lt;T&gt;(T, string)</a>
  </div>
  <div>
      <a class="xref" href="SpiceSharp.Validation.Helpers.html#SpiceSharp_Validation_Helpers_IsValid_SpiceSharp_Entities_IEntityCollection_">Helpers.IsValid(IEntityCollection)</a>
  </div>
  <div>
      <a class="xref" href="SpiceSharp.Validation.Helpers.html#SpiceSharp_Validation_Helpers_Validate_SpiceSharp_Entities_IEntityCollection_">Helpers.Validate(IEntityCollection)</a>
  </div>
  <div>
      <a class="xref" href="SpiceSharp.Validation.Helpers.html#SpiceSharp_Validation_Helpers_Validate_SpiceSharp_Entities_IEntityCollection_SpiceSharp_Validation_IRules_">Helpers.Validate(IEntityCollection, IRules)</a>
  </div>
  <div>
      <a class="xref" href="SpiceSharp.Utility.html#SpiceSharp_Utility_ThrowIfEmpty__1_System_Collections_Generic_IEnumerable___0__System_String_">Utility.ThrowIfEmpty&lt;T&gt;(IEnumerable&lt;T&gt;, string)</a>
  </div>
  <h3 id="seealso">See Also</h3>
  <div class="seealso">
      <div><a class="xref" href="SpiceSharp.Entities.IEntityCollection.html">IEntityCollection</a></div>
  </div>

</article>
          </div>

          <div class="hidden-sm col-md-2" role="complementary">
            <div class="sideaffix">
              <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
                <h5>In this article</h5>
                <div></div>
              </nav>
            </div>
          </div>
        </div>
      </div>

      <footer>
        <div class="grad-bottom"></div>
        <div class="footer">
          <div class="container">
            <span class="pull-right">
              <a href="#top">Back to top</a>
            </span>
      
      <span>Generated by <strong>DocFX</strong></span>
          </div>
        </div>
      </footer>
    </div>

    <script type="text/javascript" src="../styles/docfx.vendor.min.js"></script>
    <script type="text/javascript" src="../styles/docfx.js"></script>
    <script type="text/javascript" src="../styles/main.js"></script>
  </body>
</html>
